/*
 * CacheEntry.cpp
 *
 *  Created on: Jan 3, 2009
 *      Author: sez
 */

#include "CacheEntry.h"
#include "CharacterData.h"
#include "ClassDetails.h"
#include "Feat.h"
#include "Power.h"
#include "Trait.h"
#include "Race.h"

CacheEntry::CacheEntry() :
	mType(CHARACTER_ENTRY), mCharacter(0), mClass(0), mFeat(0), mPower(0),
			mRace(0), mTrait(0)
{
}

CacheEntry::~CacheEntry()
{
	delete mCharacter;
	delete mClass;
	delete mFeat;
	delete mPower;
	delete mRace;
	delete mTrait;
}

CacheEntry::CacheEntry(CharacterData *characterData)
	: mType(CHARACTER_ENTRY)
	, mCharacter(characterData)
	, mClass(0)
	, mFeat(0)
	, mPower(0)
	, mRace(0)
	, mTrait(0)
{
}

CacheEntry::CacheEntry(ClassDetails *classDetails)
	: mType(CHARACTER_ENTRY)
	, mCharacter(0)
	, mClass(classDetails)
	, mFeat(0)
	, mPower(0)
	, mRace(0)
	, mTrait(0)
{
}

CacheEntry::CacheEntry(Feat *feat)
	: mType(FEAT_ENTRY)
	, mCharacter(0)
	, mClass(0)
	, mFeat(feat)
	, mPower(0)
	, mRace(0)
	, mTrait(0)
{
}

CacheEntry::CacheEntry(Power *power)
	: mType(POWER_ENTRY)
	, mCharacter(0)
	, mClass(0)
	, mFeat(0)
	, mPower(power)
	, mRace(0)
	, mTrait(0)
{
}

CacheEntry::CacheEntry(Race *race)
	: mType(RACE_ENTRY)
	, mCharacter(0)
	, mClass(0)
	, mFeat(0)
	, mPower(0)
	, mRace(race)
	, mTrait(0)
{
}

CacheEntry::CacheEntry(Trait *trait)
	: mType(TRAIT_ENTRY)
	, mCharacter(0)
	, mClass(0)
	, mFeat(0)
	, mPower(0)
	, mRace(0)
	, mTrait(trait)
{
}
